I need to know how can I use app path? I have a added Shockwave Flash Object control there in my program. However I have added AxShockwaveFlash1(swfla1) there in my form. I have written code there in Form_Load event so that swfla1 will get flash file(.swf) to play. Form_Load event code : Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load swfla1.Movie = ("D:\Documents and Settings\James\My Documents\Test project\Animation\Animation.swf") End Sub Swfla1 will get flash file (.swf) from ("D:\Documents and Settings\James\My Documents\Test project\Animation\Animation.swf") this location. As a result if user will install it there in another drive it …

Member Avatar
Member Avatar
+1 forum 3

Hello,.. Im a New Guy to this forum and 1st of all;... Hi :twisted: im a newbie to c# programming as well ,,, anyway.. i have a huge issue .. here is what s going to happen.. [CODE] if (txtPath.Text != "") { FileInfo fn = new FileInfo(txtPath.Text); string p = txtPath.Text; int pos = p.LastIndexOf("."); string ext = p.Substring(pos + 1); string newname = mid + "." + ext; string path = Application.StartupPath.ToString() + "\\images\\" + newname; fn.CopyTo(path); sql = "INSERT INTO mobile(MID,MMNO,MPRICE,MINFO,MMANU,MPIC,MDOA) VALUES('" + mid + "','" + mmno + "','" + mprice + "','" + minfo + …

Member Avatar
Member Avatar
+0 forum 10

Hi all, I am working on a PHP project. Im having a problem giving the 'src' for a image, because the image file is placed outside of the www folder :(. Let me explain more. When I log in to my server using FTP logins, it gives the directory structure as below +--[B]www[/B] +--[B]project1[/B] -----+[B]www[/B] ----------[B]index.php[/B] -----+[B]resources[/B] --------+[B]additional[/B] ---------------[B]image.jpg[/B] +--oldproject +(some other folders) I can access my [B]project1[/B] directly through the browser using [B][url]http://hostname/index.php[/url][/B] That means [B]/project1/www/index.php[/B] file directly get executed by calling [B][url]http://hostname/index.php[/url][/B] (I really don't know how it is done, but it's working :)) Now I want to …

Member Avatar
Member Avatar
+0 forum 11

I'm trying to open a file (ifstream object), read from the file, then pass the ifstream object to a function where it will continue reading from the file. Along the way, I want to store the path of the file, and would like to know if there is a way to retrieve the path of the file from the ifstream object using public member functions. I didn't see any way to do this [URL="http://www.cplusplus.com/reference/iostream/ifstream/"]here[/URL], but I thought maybe someone here knows a trick to get around that (if it does, indeed, store the path). I know I can always pass …

Member Avatar
Member Avatar
+0 forum 2

Hello, I am encountering a problem when I try to connect to my webcam using CreateFile. Using the SetupApi, I found the interface path of my webcam: \\?\usb#vid_03f0&pid_5d11&mi_00#6&aad3e6&0&0000#{6bdd1fc6-810f-11d0-bec7-08002be2092f} According to the MSDN documentation I supposed that when I use this interface path in CreateFile, I will be able to read from the webcam. But when I use: [CODE] CreateFileA(detInfo->DevicePath,GENERIC_READ,FILE_SHARE_READ,0,CREATE_ALWAYS,FILE_FLAG_OVERLAPPED,0); [/CODE] GetLastError will return "2": ERROR_FILE_NOT_FOUND What's wrong?

Member Avatar
+0 forum 0

Hi all, Im trying to use a variable as a path in C. For instance, the user enters a directory and this is used with the '*.*' notation attached so the program loops all files in the directory. I've got the PHP part of this code working in a separate part of the program but dont seem to be able to get it working in C. I've attached the example code below, any ideas? Thank you for your time, [CODE=c] const char directory[50]; printf("Please enter directory to open: \n"); scanf("%s@, directory); const char directoryfile[60] = "directory\\*.*"; do { ...[/CODE] If …

Member Avatar
Member Avatar
+0 forum 3

Hi, I am using cmake to build a visual studio 2008 solution file. When I do all build it works fine, but when I try to run a certain target inside that solution its giving me errors like: fatal error: 'limits.h' file not found 'stdio.h' file not found 'reloc2.h' file not found 'stdlib.h' file not found. The build freezes in the middle. Can an expert tell me why this is happening. I looked at the executable, include, lib paths inside the vc project: tools-> options -> projects and solutions->vc++ directories, The path for VB/include or/libs etcs were all present. Thanks. …

Member Avatar
Member Avatar
+0 forum 1

Hi All, I have a application that uses Delphi 200 bpl files - I know these can just be put into the c:\Windows\System32 dir and all will work - but is it possible to put them into a directory under the Application eg c:\Program Files\ DGL-Apps\IMS\_sysbpl ? It is just far tidier in my opinion to have them under the dir. I understand that all you really need to do is add the above path to the Windows Path and it will work but I would like to do this at application runtime , as I understand it you could …

Member Avatar
+0 forum 0

how can i save the path of the picture i've browsed. i'm using vb.net as my front-end and ms access as my back-end. thanks in advance :)

Member Avatar
Member Avatar
+0 forum 2

Hello everyone, I'm new to C / C++, and just wanted to make a file which can delete an item. The code worked, but when I want to give a path, it doesn't work anymore. Any help? [CODE] #include <iostream> #include <stdio.h> using namespace std; int main() { remove ("c:\users\asus\new.docx"); return 0; } [/CODE] I'm running Vista, and use Microsoft visual studio 2008 express edition.[code][/code]

Member Avatar
Member Avatar
+0 forum 2

hey all, i have a project that is like a server and a terminal interface. the server is the one that can only make changes in the database and the terminal is more of storing what is in the database. here is the problem, i have stored a PDF file path in the database through the use of the server, but the problem is that i cant seem to display it on the terminal. i was thinking that the terminal was assuming that the file path was stored in its local hard drive. can u please help on how will …

Member Avatar
Member Avatar
+0 forum 2

Hello, i have a function that starts searching for all files that match the given file name and Recursively traverses itself into sub directories and does the same thing and when a file is found i should output its path starting from the first directory that was given to the function. my problem is that i keep having partial paths . Here is the part of code where everything goes wrong [CODE] buffer = (char*) malloc (strlen(dirname)+1); while ( (dir = readdir( d )) ) { if (strcmp(dir->d_name,".") == 0 || strcmp(dir->d_name,"..") == 0) continue; if (buffer==NULL) exit (1); strcpy(buffer,dirname); …

Member Avatar
Member Avatar
+0 forum 1

I am trying to add a path to sys.path fix an error importing numpy. If I do: [CODE]import sys sys.path.append('/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages') print sys.path[/CODE] then path that I just added shows up and import numpy works. However, if I restart IDLE and try to import numpy again, I get an error. How can I make the path stay permanently? Snow Leopard, Python 2.6

Member Avatar
Member Avatar
+0 forum 3

when using the data_files option in my setup.py #!/usr/bin/env python import ctypes from OpenGL.platform import win32 from distutils.core import setup import py2exe import sys sys.path.append("dist") setup(options = {"py2exe": {"compressed": 1, "optimize": 2, "includes": ["ctypes","Tkinter","Numeric"], "excludes": ["OpenGL"] }}, zipfile = None, data_files=['msvcr71.dll', glut32.dll'], windows=['myprogram.py'] ) I get an error saying msvcr71.dll is not found. It exists in `C:\windows\system32`. If I specify its full path then I get a similar message about glut32.dll. That one exists in the python site libs. If I include it I get an executable but it doesn't work. I wonder though, whether py2exe can find those dll's …

Member Avatar
Member Avatar
+0 forum 2

Hi, I have the following string in a XML file.. [CODE]<pre>&lt;/BODY&gt;&lt;/HTML&gt; ------_=_NextPart_002_01C84D7E.9133E008-- Content-Disposition: attachment; filename="footer.txt" Content-Transfer-Encoding: base64 G:\Test\Attach\footer.txt --------------Boundary-00=_BLD1cvEPKmuNkgPvUNY3-- Content-Disposition: attachment; filename="Press.xls" Content-Transfer-Encoding: base64 g:\Test\Attach\Debankan\Press.xls ------_=_NextPart_001_01C84D7E.9133E008-- </pre>[/CODE] I will pass the filename and i want to get the path from the above string.. [B]For ex.. if i pass "footer.txt" i want the result path as "G:\Test\Attach\footer.txt"..[/B] Can someone help me out?. I will be using C#. Can someone tell what String Methods will be useful.. Please it quite urgent.. Thanks Raja

Member Avatar
Member Avatar
+0 forum 1

I have created a windows application using C#. the problem is fairly simple. I doono how to refer to the Application path in c#. In Vb we can use App.path to refer to the Application path My C# code for opening a report is as [code=c#] public partial class frmSpaBill : Form { string report_file =@"F:\Spa n saloon\Spa n Saloon\Spa n Saloon\SpaServiceBill.rpt"; ReportDocument ReportDoc = new ReportDocument(); public frmSpaBill() { InitializeComponent(); } private void frmSpaBill_Load(object sender, EventArgs e) { ReportDoc.Load(report_file); crystalReportViewer1.ReportSource = ReportDoc; makeReport(report_file); SetParamValue("@date",BillVariables.date); SetParamValue("@timein", BillVariables.timein); SetParamValue("@timeout", BillVariables.timeout); SetParamValue("@CustID", BillVariables.custID); SetParamValue("@CustName", BillVariables.custName); SetParamValue("@SpaID", BillVariables.ServID); SetParamValue("@SpaServiceName", BillVariables.ServiceName); SetParamValue("@Description", BillVariables.Description.Replace("\r\n", "__")); …

Member Avatar
Member Avatar
+1 forum 5

The End.