|
Firstly, nobody is going to write your code for you.
Secondly, I gave you a suggestion last time you posted this question.
Thirdly, try a Google search[^] before asking your question. You may find what you are looking for.
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
pls, help me!!!
While Upgrade VB6 project to VB.Net. i have got the following error
"Upgrade failed: Exception occurred: Can't use character device names in file names"
i need your help!!!
|
|
|
|
|
hi
The problem is occuring becuase one file in your project (Form1) does not have an extinsion. To work around the problem simply rename the file Form1 to Form1.frm from within VB6.
Or
Look for a file in your VB6 project that has a name like the old DOS device names (CON, COMx, LPTx, KBD, NUL, AUX, PRN). Rename the file.
or
convert it in 2003 and then use 2005 to convert the 2003
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
I *think* this means you can't use character device names in filenames. You probably need to rename a file or two.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello everyone ...
Sorry for my English
As evidence, I can not exploit the events of Sons and Form I captures any project that I am doing.
Virtually must use all events especially those of the Mouse and Keyboard.
One more thing ...
There is a way to save Form Sons Open In Form Father? I explain better ...
The application starts from Form Father, I click the button again, and you open a Form Son, I click still new and still opens a form Son etc. ..
Now the form that I opened Children can be saved? If I close the application and open again there is a way to regain the form that had opened the proceedings before?
I hope someone can help me because I am looking for in all sites but can not find anything that could help me.
Thanks in advance hello
|
|
|
|
|
To remember which forms are open, you need to create a file that stores this information, then read it on opening and reopen the forms you want to be open. There's no automatic way to do this.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi!
I'm implementing VPN for my final year project using OpenSSL.
I tried to find out details about implementation and found out that I need a network driver. Writing a driver won't be possible for me so I tried to search for a ready-made one and I came across PCAUSA & I also found out that DDK has a few samples for me to use.
Please direct me to the right path.
P.S.: I'm a newbie programmer...
|
|
|
|
|
Warp wrote: Please direct me to the right path.
To what?? You haven't specified what you're having a problem with.
<blockquote class="FQ"><div class="FQA">Warp wrote:</div>P.S.: I'm a newbie programmer... </blockquote>
You might want to pick a different project. If you're a newbie, you've most assuredly bitten off WAY more that you can chew with this project. Part of picking a project is learning how to research the requirements of each idea so you at least have a chance of finishing it before it's due.
|
|
|
|
|
hi all,
I'm playing with the PrintDialog, PrintPreviewDialog and PrintDocument (VB2005 & .Net2.0) so I'm building the document to print on runtime: the user choose some parameters and then the program must print a list of the ones that fits the params. The PrintDocument is build when the PrintDocument1_PrintPage event occurs and by inserting Strings and Lines through e.Graphics.DrawString and e.Graphics.DrawLine commands. That's fine (quite tough ) but I can't manage to add more pages to the document to print. How do I force a new page to fill with data so the document to print would have more than one page? I haven't found the way for changing the page !!!
Thanks in advance,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
For starting a new page, you will need to set e.HasMorePages property to True and exit the PrintPage event. If this property is set to true while exiting sub, this event will be called again and its content will be printed on the next page.
Therefore it should be something like –
e.HasMorePages = True
Exit Sub
Please remember that you will need to track manually when this event is being called for the second time and what you need to print on the second page. This can be done using a global variable. Such as –
----------------------Code Start---------------
Dim PageCount As Integer = 1
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
If PageCount = 1 Then
''''Code to print on first page
e.HasMorePages = True
PageCount += 1
Exit Sub
ElseIf PageCount = 2 Then
''''Code to print on Second Page
e.HasMorePages = True
PageCount += 1
Exit Sub
End If
End Sub
------------------Code End-------------------
In the similar way you may create any number of new pages.
I hope this helps .
-Dave.
Dave Traister,
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
Great, it's what I was looking for.
Thanks,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
i use vb 6.0 and ms access i except following result , below i menson table and excepted result
memberno liter test amount purhase purchasedate
501 5 6 30 morning 1/2/2008
501 6 5 15 evening 1/2/2008
502 5 5 25 morning 2/2/208
502 6 5 30 evening 2/22008
501 6 6 36 morning 3/2/2008
501 5 5 25 evening 3/2/2008
excepted result
1/2/2008 2/2/2008 3/2/2008
memberno morning evening morning evening morning evening
501 30 15 0 0 36 25
502 0 0 25 30 0 0
please sent reply
|
|
|
|
|
What is the actual issue? and I take it you mean "Expected results" not "Excepted result".
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
Hi there, I’m hoping that one of you guys can help me as I have been struggling to find an answer.
Using VB.NET I have some code that filters out what I need from a dataset, that is fine for a direct match but if I wish to display all entries how do I do this?
Normally I use something like the below that works fine if I wish to return the results of one Instructor, but if I wished to return all instructors from the same dataset I cant seem to find the appropriate method to do so (wildcard such as "*" don’t seem to work):-
daSession.SelectCommand.Parameters("Instructor").value ="13"
Have any suggestions?
Microsoft Visual Basic .NET (2003) version 7.1.6030
Microsoft .NET Framework 1.1
|
|
|
|
|
I use a standard select for all table (created by a codebuilder app I built) with the following.
AuditTypeID is the identity field on the table
ALTER Proc [dbo].[AuditTypeSelect]<br />
--Declare<br />
@AuditTypeID as int<br />
<br />
AS<br />
<br />
Select *<br />
From AuditType<br />
Where (IsNull(@AuditTypeID, -1) = -1 OR AuditTypeID = @AuditTypeID)<br />
Order By AuditType
This returns 3 table types based om the value of @AuditTypeID
@AuditTypeID = -1 returns every record in the table
@AuditTypeID = 0 returns an empty table ready for data entry
@AuditTypeID = ## returns 1 record matching ##
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
no, sorry but i cant get that too work.. my data adaptor name is "daSession" and the feild to filter is "Sim_code".. im trying to use this same Data adaptor for two queries, in one query i wish it to display all sim_code in the table...
i'm a little green with this and willing to learn, so a little push would be appreciated..
Colin
Microsoft Visual Basic .NET (2003) version 7.1.6030
Microsoft .NET Framework 1.1
|
|
|
|
|
Assuming that sim_code is a numeric, you need to pass a parameter to your stored proc (@sim_code|@instructor)
If you change this proc so
AuditType = your table name
AuditTypeID = sim_code
@AuditTypeID = @sim_code
ALTER Proc [dbo].[AuditTypeSelect]<br />
--Declare<br />
@AuditTypeID as int<br />
<br />
AS<br />
<br />
Select *<br />
From AuditType<br />
Where (IsNull(@AuditTypeID, -1) = -1 OR AuditTypeID = @AuditTypeID)<br />
Order By AuditType
Then test it with the values -1, 0 and 13
BTW
You are going to cause confusion all round if you change the var names all the time. If you are filtering Sim_Code then you should call the var @Sim_Code not instructor
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
does this work in vb.net 2003, i cant seem to get the code excepted, unless im barking up the wrong tree.
Im starting to think it cant be done..
in my data adaptor i have a critera for Instructor set as =? and the StartDate criteria as >=?
so i need to send it some sort of wildcard to allow the dataset to return all the instructors greater than the StartDate, as im also filter in out StartTime. do i need to remove the filer commands from the data adaptor to allow this code to work?
maybe I'm just in over my head
Microsoft Visual Basic .NET (2003) version 7.1.6030
Microsoft .NET Framework 1.1
|
|
|
|
|
coldude wrote: Im starting to think it cant be done..
Rubbish - it's just hard work to start with, every accomplished developer does this in their sleep!
You may be in the situation where you are trying to make 1 procedure do 2 tasks, a filtered list and the total table.
I assume you have control of the stored proc and can identify the parameter names (instructor and start date)
Write and test the stored proc so that it returns the results you expect passing in various values for the parameters. Do this in the database ui (management studio for SQL Server). If you don't have a ui for the database get one NOW.
If you cannot get the results from 1 proc then write 2, you can always eliminate 1 when you learn more (remembering to eliminate it is the real challenge )
Now you can replace the ? with the values you expect.
Also look into creating a Data Access Layer (DAL) CP has many examples of these.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi!
I want the page to stay in same page if there is any exception and if there are none i would want it to direct to another page. how could i achieve this? please help
|
|
|
|
|
Sounds like an ASP.NET question to me. Use validators. And next time ask in the right place.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i want to know how to read the content of a http posted file using stream reader i am using the folloing line but an error in the last line sayin that " 'System.IO.Stream' cannot be converted to 'System.IO.StreamReader'."
fileupload1 is the name of the command button there in the tool box
Dim str As StreamReader
Dim hp As HttpPostedFile
hp = FileUpload1.PostedFile
str = hp.InputStream
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
sajan ss wrote: 'System.IO.Stream' cannot be converted to 'System.IO.StreamReader'."
I guess that means you've got the wrong variable type. Use a Stream instead, or use it in place. I believe you will find it has a Read and a Write method.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I am developing an embedded C application for a small microcontroller. One thing I have found useful in the past was to write a DOS-based PC front end which would simulate the main aspects of the target environment. I would thus have three pieces of code:
-1- The common code, which would run identically on the PC and in the final application, thus allowing it to be debugged on the PC.
-2- The PC-side code for routines like get_time_of_day(), set_time_of_day(), switch_motor(), check_switch(), etc. would virtualize them as appropriate. The user could turn switches on and off via the keyboard, as well as adjust the relationship between real time and the time reported to the application. Hardware functions like motors would be displayed on screen.
-3- The microcontroller code for those routines would perform them on real hardware.
Previously, I've used Turbo C for DOS to do the PC front end, but that's rather clunky. I'd like to migrate to using Windows. I've done a little Windows programming in C, but it would seem like it would be more convenient to have a vb.net application maintain the user interface and have it communicate somehow with a C application which would simulate the microcontroller.
I wouldn't be looking to do a super-detailed hardware simulation, but rather a more general one (e.g. I'd use a PC version of the get_time_of_day() function to simulate getting time of day, rather than trying to write a PC function to simulate pulsing the processor pins necessary to communicate with the real-time clock chip).
Has anyone done anything similar, or can anyone offer any advice? Two notable ceaveats:
-1- It would not be acceptable for the VB program to simply call a C function which would have to completely finish execution before control could return to VB, but...
-2- It would be acceptable to have the C application only yield control during its own check_event() and wait_event() procedures. I don't feel a need to simulate interrupts and other such features.
The first requirement would suggest that simply using a DLL would probably not work well, unless I used multi-threading and had a means for threads to communicate. Having applications that share messages with each other would seem a better solution.
|
|
|
|
|
Vb.net has a built in control called serial port (I'm not sure if they have one for usb). If you have a microcontroller that can interface with a serial port then you could send messages between your pc and microcontroller with a serial port (just make sure your settings match on each side). Just write some code in each program to interrepret the messages and data so each program can act accordingly.
hope this helps,
Mike
|
|
|
|