|
I have a customer who wants an existing C application ported to VB, and I'm having a bit of trouble trying to find a way to read and write the same data files as the previous program used.
Existing struct example: (the actual structures are quite a bit more complex but I'm going for clarity here)
struct system_info
{
char name[32];
int number;
int more_numbers[DEFINED_LENGTH];
double even_more_numbers[OTHER_DEFINED_LENGTH];
unsigned char padding[103];
};
fread(&system_info, sizeof(system_info), 1, file);
I've found that there's no way to have fixed-length arrays inside a struct in VB (2005, if it matters), so I'm stumped as to how to load in fixed-length records with numerous arrays inside them.
On top of that, when I use variable length arrays the size of the structure is not correct (by which I mean it doesn't match what I expect).
Any ideas/suggestions?
|
|
|
|
|
First question: VB 6 or VB.NET? The answer will help determine how I look for a solution.
Tim
|
|
|
|
|
.Net - VB2005.
I've spent over an hour looking for some sort of solution already, and either Google has failed me or I have failed at using Google. I hope someone else has better luck, or better intuition.
|
|
|
|
|
(no <pre> here due to VB attribute syntax)
Maybe partial solution: (from http://answers.google.com/answers/threadview?id=95319)
structure system_info
<VBFixedString(32)> dim name as char
dim number as integer
<VBFixedArray(DEFINED_LENGTH)> dim more_numbers as integer
'... etc
end structure
FileOpen (1,filename, OpenMode.Binary)
FileGet(1,system_info)
Still got a bunch of stuff to apply this attribute tag to before I can see if it works though...
|
|
|
|
|
Private Structure OPENFILENAME
Dim lStructSize As Integer
Dim Arr(len(msString)) as string
Dim hwndOwner As Integer
Dim hInstance As Integer
Dim lpstrFilter As String
Dim lpstrCustomFilter As String
Dim nMaxCustFilter As Integer
Dim nFilterIndex As Integer
Dim lpstrFile As String
End Struct
you can use some type of Solution.you can use variable first then execute the query now.
'Nothing Is Impossible'
Regard
Anubhava Dimri
anubhava.prodata@gmail.com
919250168195
|
|
|
|
|
salam sir;
how can made msn messenger or windows messenger in vb.net?please send me coding of this application and send me msn messenger application in vb.net project
thanks sir
mohammedali
|
|
|
|
|
You are asking for a complete application to be written for you.
The forums are for asking direct questions about a specific problem.
I doubt anyone will send you a complete Instant Messenger application.
Search the Internet for examples and write your own.
|
|
|
|
|
OK - sure. That will be $20k.
Do you want my Paypal details ?
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
mohammedali2006 wrote: how can made msn messenger or windows messenger in vb.net?
Ok. Use windows controls suitable for the application, write code, and then hit Ctrl+Shift+B to Build Appication OR hit F5 to run it.
mohammedali2006 wrote: please send me coding of this application and send me msn messenger application in vb.net project
Stop asking people to do your work!! We're here to help you not to do your homework.
And READ THIS[^] very carefully. And read it every time before you post any question.
- Stop thinking in terms of limitations and start thinking in terms of possibilities -
|
|
|
|
|
--> i have written an application like that but works only on LAN.
--> Do you want it. if yes then send me $10k.
--> iif(AGREE,i will send you my mailing information,LEAVE IT)
J A Nasir K
|
|
|
|
|
I have used the visual basic express edition 2008 to create an application. In order to run this application the user must have the .net 3.5 framework installed. I have created an deployed an application but it downloads the framework from microsoft. But the user may not have an internet connection and there for i wish to include the framework when creating the application setup.exe. Can anyone tell me how i would go about this? Any help is much appreciated.
|
|
|
|
|
You'll have to include the dotnetfx.exe setup on the distribution media (CD, DVD, what have you). Using the Express Editions, you don't have the options available to add the .NET Framework into the installation.
|
|
|
|
|
I am using a cd. Is there any help available online in using this method?
Regards
McGann
|
|
|
|
|
A CD?? Then all you have to do is put the dotnetfx.exe installation on the same CD. Run the dotnetfx.exe setup first, then run your app's installation.
The method I mentioned only work with the full versions of Visual Studio, and it's as simple as turning on a prerequisite option in the Setup project.
|
|
|
|
|
Hello every one
I want to know ow can i
- Find the dimensions of a image
- Size of Image
without actually opening it in a picture bos
My objective is
- I have a application in Vb.net where i let the user select a JPEG file and upload it in a DB
- Now if the image is too big in size and dimensions then it takes a good time in retrieving it from the DB.
What my idea is
- Reduce the picture dimension if it is too big for the application use
- Reduce the size (if possible) by reducing the picture quality if the size is still too big after reducing the dimensions
Regards
Nishkarsh
|
|
|
|
|
Load it into a Bitmap object. You don't need a PictureBox at all. Once you have it in a Bitmap object, there are Width and Height properties you can look at. To get the file size, you'd have to check the size from the streamed number of bytes. There is no size property in the Bitmap object.
|
|
|
|
|
--> well there is no forum for Win XP. And i also posted this question in Vista forum but no answer. so thats why i am posting this question here:
--> How will i change the background image in the explorer (e.g; when open the C drive)?
J A Nasir K
|
|
|
|
|
And you're not going to get an answer here either because your question has nothing to do with VB.NET or the .NET Framework. Try the General Discussions forum.
Besides, you only waited about 20 minutes in the Vista forum before deciding that was too long to wait for an answer.
|
|
|
|
|
Where did you get those fancy arrows from?
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Is there a way of editing the configuration of the standard windows screensaver "3D Text" using VB/C# code?
|
|
|
|
|
You have to modify the registry entires under HKEY_CURRENT_USER\Software\Microsoft\Screensavers\Text3D. You just use the normal Registry classes in the .NET Framework to do this.
|
|
|
|
|
Hi Friends,
I am using MaskEd control to get From Time and To Time.
I have set the Mask property to "##:##"
After given from time and to time , I need to find the difference between to time and from time...
But it is not allowing since it is string...So can anyone pls..tell me..how can i do that...
or how to convert string to integer.....
Please Help.
Thanks in Advance,
Regards
|
|
|
|
|
I think you're mistaken in what you want the masked text box to do.
int.TryParse is how you work out if a string is an int, and convert it.
Christian Graus
Please read this if you don't understand the answer I've given you
"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,
How to store and show images from the access database to datagridview.I am using VB.NET 2005.
can anyone suggest solution for this.
|
|
|
|
|
Took about 1 minute on Google ^ to see how to store and retrieve images from access, now you see if you can use it for putting them into a datagridview.
Google is one of the greatest programming aids around, try it!
Bob
Ashfield Consultants Ltd
|
|
|
|