|
It seems likely to me that the classes to do this will have changed so utterly that your best bet is a rewrite
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
If you are clear of what you are trying,then better have a new project by this u will be getting more options and tools to enhance your project .
Develop2Program & Program2Develop
|
|
|
|
|
Hello,
I am working on a custom control which has 'items' the only thing left to do which has me stumped is getting the items to persist.. I have searched around but am either looking for the wrong thing or there isnt a simple tutorial out there.. because when I add items at design time they disappear once I build/run my application.
Can anyone help or point me in the right direction?
Thanks
Ian.
|
|
|
|
|
Hi Ian ... I'm also interested in this as well .. I've posted a similar message here re: serialization ... which is one metod ... but I've not had any success with my attempts at getting it to work ... I'm hoping we might get an expert answer from one of the more knowledgable here on the forum .. fingers crossed ...
GaryW
|
|
|
|
|
I want to write a windows service that shuts down the computer between 4:30am and 5:30 am every morning provided nobody is currently logged in. The computer is running XP professional, and the windows service I wrote uses the account "LocalSystem".
I have been able to create a windows service, and determine if anyone is logged in but I am running into problems with the shutdown command. I have a timer to check if conditions are right (ie. nobody logged in, and within the specified reboot time interval) and then I run the following code to shut down the system:
System.Diagnostics.Process.Start("Shutdown", "-s -t 1")
I can't seem to get this to work unless I am logged in. If I am not logged it, it does nothing until I log in and then immediately shuts me down. "Shutdown" seems to require a logged in user. Is there a way to shutdown the computer when I am not logged in?
Thanks.
|
|
|
|
|
I am guessing it has to do with some of the setting on the process. There are some things you can set like
Process.StartInfo.CreateNoWindow = false
Hope that helps.
Ben
|
|
|
|
|
At runtime I have a button and other controls that load images from a file,
below is one example,
DIYButton.BackgroundImage = Image.FromFile(ChosenPath & "\DIY.gif")
What I want is to have it load the image, if it's a gif or jpg
How do I go about it?
|
|
|
|
|
Something like this, maybe:
If My.Computer.FileSystem.FileExists(ChosenPath & "\DIY.gif") = True Then
DIYButton.BackgroundImage = Image.FromFile(ChosenPath & "\DIY.gif")
ElseIf My.Computer.FileSystem.FileExists(ChosenPath & "\DIY.jpg") = True Then
DIYButton.BackgroundImage = Image.FromFile(ChosenPath & "\DIY.jpg")
End If
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
|
You can name the file whatever you like, it will still open as either a gif or jpeg, based on it's format. You can use File.Exists to check if the file is there in either format, also.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Such thing are better if you could do bit of R&D which may result in bubbling of new things and Ideas.
Develop2Program & Program2Develop
|
|
|
|
|
I want to use a LinkButton because i want when it have been clicked do somthing and i want when it have been right clicked and press Open in new window a new page appears but i don't know how can i open new window.
Please help me.
Thanks in advance.
|
|
|
|
|
In the code for your LinkButton type: Process.Start("http://www.example.com") . This will open a new tab/window in your default browser.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
I have looked for ever for this information. Does anyone know of a good tutorial or description of how to receive information from the sound card, c#,VB.net or VBA preferably. I am a ham radio operator and would like to write my own Morse Code decoder via sound card interface. There are many out there but I want to integrate this into a radio control program
Harry8227
|
|
|
|
|
You put this in a Dispose implementation?? What are you trying to do with this code? This is something you would normally find in a form's Closing event, not Dispose.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hi:
Supouse I have this Table in a Access database:
Table Name: CostumersType
Fields: ID(Autonumber),Name(text(50)), Costumers(object)
And this Class
Class Name: Costumers
Class Properties: name(string),id(integer)
And i add some items of the class costumers to an arraylist called Costumers.
Then I want to save the content of the arraylist to the field costumer of the database. And I don't know how.
Guille
|
|
|
|
|
This is not a possible i think and not a good approach either.
Why you need to put arraylist in the table field?
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
Hi,
I developed an windows application that inserts some values into database.It is working fine.But now i have two problems
1) I prepared an exe file for my application and installed in another system. When i executed my application in that system it given me error as it doesn't find database. I have given the Datasource as "Data Source=D:\Dotnet\SurveyApp\SurveyApp\SurveyData.mdb".
Can any one suggest me what i have to do to solve this
2)I have another doubt i.e is it necessary that ms access should be installed the syystem where i installed my application?
Please help me solve
Thanks
vijay
|
|
|
|
|
vijay2583 wrote: I prepared an exe file for my application and installed in another system. When i executed my application in that system it given me error as it doesn't find database. I have given the Datasource as "Data Source=D:\Dotnet\SurveyApp\SurveyApp\SurveyData.mdb".
Can any one suggest me what i have to do to solve this
And is that the location of the database on the new machine? If not then it seems fairly obvious to me that you need to change the location of the database in the datasource. If this value is hard coded then you might want to learn the lesson not to hard code file paths in an application.
So, where is the database now?
vijay2583 wrote: I have another doubt i.e is it necessary that ms access should be installed the syystem where i installed my application?
That depends. Do you intend to share the data? If yes, then SQL Server is probably a better option as it is more able to share data between multiple machines. If not, then you probably want to copy the database.
|
|
|
|
|
Good way to learn some Grammer of Software
Develop2Program & Program2Develop
|
|
|
|
|
Hello every one
I am doing one project with random file function and i have problem with file open but i can open file in my list box but i can not open file in text box i have three variable id , name , and weight, in find event i put one button and three text box so when user put id in first text box and click find button it should display name and weight in other two text box but it's not so any help, this is what i have done so far
Structure Ink<br />
Dim Weight As String<br />
Dim InkID As String<br />
Dim InkName As String<br />
End Structure<br />
Private Function FindLastRecordNo() As Integer<br />
Dim Temp As Ink<br />
FileNumber = FreeFile()<br />
FileOpen(FileNumber, "c:\inklist.txt", OpenMode.Random, OpenAccess.Read, , Len(Temp))<br />
FindLastRecordNo = 1<br />
Do While Not EOF(FileNumber)<br />
FileGet(FileNumber, Temp, )<br />
FindLastRecordNo = FindLastRecordNo + 1<br />
Loop<br />
FileClose(FileNumber)<br />
End Function<br />
<br />
I have no problem with this event <br />
<br />
<code>Private Sub btnOpenList_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOpenList.Click<br />
Dim MyInk As Ink, Count As Integer, Temp As String<br />
Dim MyLine, MySubString As String, LineWidth As Integer = 60<br />
FileNumber = FreeFile()<br />
FileOpen(FileNumber, "c:\inklist.txt", OpenMode.Random, , , Len(MyInk))<br />
Count = 1<br />
lstInk.Items.Clear()<br />
Do While Not EOF(FileNumber)<br />
FileGet(FileNumber, MyInk, Count)<br />
Temp = MyInk.InkID + MyInk.InkName + MyInk.Weight<br />
lstInk.Items.Add(Temp)<br />
Count = Count + 1<br />
Loop<br />
FileClose(FileNumber)
End Sub
but i have problem with find click event it's not showing any thing in textbox
<code>Private Sub btnFind_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnFind.Click<br />
Dim MyInk As Ink<br />
FileNumber = FreeFile()<br />
FileOpen(FileNumber, "c:\inklist.txt", OpenMode.Random, , , Len(MyInk))<br />
Do While Not EOF(FileNumber)<br />
FileGet(FileNumber, MyInk, )<br />
If MyInk.InkID = txtID.Text Then<br />
Position = Loc(FileNumber)<br />
txtIName.Text = MyInk.InkName - this is the problem:confused:<br />
txtIWeight.Text = MyInk.Weight - this is the problem :confused:<br />
Exit Do<br />
End If<br />
Loop<br />
FileClose(FileNumber)<br />
End Sub
any help
wating for your kind help
|
|
|
|
|
You're going to have to put a breakpoint on the FileOpen statement in the btnFind_Click event, then step through the code line by line and watch what's happening in each of the variables in your Do/While loop. It looks like you never find the data your trying to search for.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
hello sir
first of all thanks for your kind rep.
this the first code for suructure
Structure Ink<br />
Dim Weight As String<br />
Dim InkID As String<br />
Dim InkName As String<br />
End Structure
thsi is code for structure and now i have changed to this
Structure Ink<br />
Dim Weight As String<br />
Dim InkID As Integer (this is what i have changed )<br />
Dim InkName As String<br />
End Structure
and it's working but now there is another problem is's not showing InkID in listbox it's only shows number "0" for all entrys
so can you help me with this
wating for your kind rep.
|
|
|
|
|
Dear All,
Is it possible to write a string from vbscript to console. How can we write that?
regds
Shihab
|
|
|
|
|
You might be able to use Wscript.Echo("A String")
|
|
|
|