|
you can just store the image path in the database and then use the load picture function and use the path stored in the database if you dont know these functions i know i have the code somewhere i would have to find my .net version but i know exactly where my vb6 version is so let me know if you need further help
|
|
|
|
|
|
Thanx a lot Thats what i was needed
|
|
|
|
|
How can i use a dll in VC++ which is written in VB???
please help me as soon as possible.
thanks
sukhdeep
|
|
|
|
|
Yes..
If you make a VB project ActiveX DLL and create Class modules you can cerate objects of these classes in VC++
but VB can't expose functions that can be called using Declare in vb6 or ::LoadLibrary in VC++
|
|
|
|
|
Hi,
How can I print pdf files from a batch file without user interaction and to any specific printer. Its important the printer selection.
Regards
Pedro
|
|
|
|
|
|
i am in the process of writing a game called bunco and i have hit one of those walls. Basically i have an 12 element array and at the end of the game i need to find out which element holds the highest value,which holds the second highest, and what holds the third highest but i also need to find out if there is a tie for any of those spots now i know the long way to do this but was hoping that someone might know a shorter and more effiecient way
|
|
|
|
|
If in VB.NET, use Array.Sort.
If in VB6, search the web for a sort routine.
It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)
|
|
|
|
|
thats not exactly what im looking for. it is vb6 and the reason i came here was to find some help normally i would just use this one sort function but the problem is the elements in the array are all instances of the player class so not only do i need to find out the 1st 2nd and 3rd place winners but i need to know the names of them which makes it a little more noodle scratching than a normal array and the thing that sucks most is i can see the solution on the back of my brain well anyways if anyone has any ideas
|
|
|
|
|
Hi,
I am trying to convert the below code to a vb.net project.
I have tried all sorts but didnt manage to do it.
can anybody help?
http://www.codeproject.com/csharp/servercombobox.asp?target=servercombobox
Thanks A lot
Gabriel
vbnetuk@yahoo.co.uk
|
|
|
|
|
What are you trying to do? The whole control or just the Server enumeration?
|
|
|
|
|
I managed to convert the server enumeration no problem it's driving me mad and would seriously appreaciate somebody's help.
There is only one class "Network Management" and it's not that
big but non knowing c# that well it's proving a nightmare.
I only need to convert that class.
Thanks A lot
Gabriel
vbnetuk@yahoo.co.uk
|
|
|
|
|
Well, I am not going to go in depth, converting this stuff takes a lot of time and patience. However, if you want help on a specific piece, post it here.
|
|
|
|
|
I totally understand that .Thanks
There are 2 piecies of code that creates problem for me
1)
public bool MoveNext()
{
bool result = false;
if ( ++currentItem < itemCount )
{
int newOffset = serverInfoPtr.ToInt32() + SERVER_INFO_101_SIZE * currentItem;
Win32API.SERVER_INFO_101 si = (Win32API.SERVER_INFO_101) Marshal.PtrToStructure(new IntPtr(newOffset), typeof(Win32API.SERVER_INFO_101));
currentServerName = Marshal.PtrToStringAuto(si.lpszServerName);
result = true;
}
return result;
}
=====================
2)public static ServerType GetServerType(string serverName)
{
ServerType result = ServerType.None;
IntPtr serverInfoPtr = IntPtr.Zero;
uint rc = Win32API.NetServerGetInfo( serverName, 101, ref serverInfoPtr );
if ( rc != 0 )
{
Win32API.SERVER_INFO_101 si = (Win32API.SERVER_INFO_101) Marshal.PtrToStructure(serverInfoPtr, typeof(Win32API.SERVER_INFO_101));
result = (ServerType) si.dwType;
Win32API.NetApiBufferFree(serverInfoPtr);
serverInfoPtr = IntPtr.Zero;
}
return result;
}
Thanks A lot
Gabriel
vbnetuk@yahoo.co.uk
|
|
|
|
|
Ok, let me attempt this blindly since I do not have all the code LOL! Lets start with the First one. I may rename variables but you'll get the idea.
The number one thing in dealing with API Calls is this:
Imports System.Runtime.InteropServices 'Put in Header
'=====================
'1.)
Public Function MoveNext() As Boolean
Dim svrInfo As Win32API.SERVER_INFO_101
Dim bResult as Boolean = False 'Unnecessary because Boolean = False by default
CurrentItem += 1 'Increment the CurrentItem Counter
If (CurrentItem < ItemCount) Then
Dim iOffset As Integer = (svrInfoPtr.ToInt32 + SERVER_INFO_101_SIZE * CurrentItem)
Marshal.PtrToStructure(New IntPtr(iOffset), GetType(svrInfo))
CurrentServerName = Marshal.PtrToStringAuto(svrInfo.lpszServerName)
bResult = True
End If
Return bResult
End Function
'=====================
Lets make it a little better by using some Error Trapping. Try this next example:
'=====================
'1.)
Public Function MoveNext() As Boolean
Dim svrInfo As Win32API.SERVER_INFO_101
Dim bSuccess As Boolean
CurrentItem += 1 'Increment the CurrentItem Counter
If (CurrentItem >= ItemCount) Then Return False 'Exit if the Item is outside the Memory Address Range
Try
Dim iOffset As Integer = (svrInfoPtr.ToInt32 + SERVER_INFO_101_SIZE * CurrentItem)
Marshal.PtrToStructure(New IntPtr(iOffset), GetType(svrInfo))
CurrentServerName = Marshal.PtrToStringAuto(svrInfo.lpszServerName)
bSuccess = True
Catch
'Display Error Message if you want
bSuccess = False
End Try
Return bSuccess
End Function
'=====================
To be continued...
Not all those who are lost are looking to be found. But of those who are lost and those who are found, all are looking for something higher than themselves.
|
|
|
|
|
...Continuation:
'=====================
'2)
Public Function GetServerType(ByVal ServerName As String) As ServerTypes
Dim svrInfoPtr As IntPtr = IntPtr.Zero
Dim svrInfo As Win32.SERVER_INFO_101
Dim hResult As Integer = Win32API.NetServerGetInfo(ServerName, 101, svrInfoPtr) 'Make sure the API Declarations have the Appropriate Byval / Byref
If (hResult <> 0) Then
'Marshal.PtrToStructure(svrInfoPtr, GetType(svrInfo))
Marshal.PtrToStructure(svrInfoPtr, svrInfo)
Return Ctype(svrInfo.dwType, ServerTypes)
Else
Return ServerTypes.None
End If
End Function
I am sorry if there is anything wrong with these Posts...again, I did this all by looking at it and I did not "Pre-Code" this to see if it works.
Good luck!
Not all those who are lost are looking to be found. But of those who are lost and those who are found, all are looking for something higher than themselves.
|
|
|
|
|
I am using VB.Net..
I have been trying this for awhile...
Im making a simple console app that is a database for different video games.
It will store the name, genre and a rating out of 10..
But I want it set up as several sub procedures to clean up my code.
Also because I hoped it would look like an old DOS menu based system...
Something like this:
Games Database
--------------
1) Add a game
2) Display a games info
3) Display rating average
4) Display rating summary
5) Delete a game
6) Quit
Enter a choice:_
______________________________________________
"I'm not me when I dream...anymore." -TRUSTcompany
|
|
|
|
|
This is what i have so far..and i'm getting an error...
Module Exercise4
Private Structure Game
Dim name, genre As String
Dim rating As Single
End Structure
Sub Main()
Dim gameArray() As Game
Dim choice, count As Integer
Dim name, genre As String
Dim rating As Single
Call DisplayMainMenu()
choice = CInt(Console.ReadLine())
If choice = 1 Then
Console.Write("Enter the name of the game: ")
gameArray(0).name = CStr(Console.ReadLine())
End If
Console.ReadLine()
End Sub
Private Sub DisplayMainMenu()
Console.WriteLine(" Game Database" & vbCrLf & " -------------")
Console.WriteLine(vbCrLf & "1) Add a Game" & vbCrLf & "2) Display a Game")
Console.WriteLine("3) Display Rating Average" & vbCrLf & "4) Display Rating Summary")
Console.WriteLine("5) Quit" & vbCrLf)
Console.Write("Enter a choice: ")
End Sub
End Module
______________________________________________
"I'm not me when I dream...anymore." -TRUSTcompany
|
|
|
|
|
What's the error and where does it point to?
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|
|
I figured it out, but thanks anyway
______________________________________________
"I'm not me when I dream...anymore." -TRUSTcompany
|
|
|
|
|
can anyone help.
I want to record audio from a mic to a wav file in vb.net.
can anyone show me some sample codes etc..
thanks
Paul
|
|
|
|
|
sir
i have a VC++ com dll that returns an array of strings.
i want to pass the address of this string array to a pointer & pass this pointer as a argument to a function in vb.net / C#
how do i do this
|
|
|
|
|
Wow. I was reading this stuff about how great VB .NET is for Game programmign and it says it supports Multithreading. Hmmm. Someone please tell me what this is?
Thanks
|
|
|
|
|
Haven't you done any courses in Computer Science. I sure threads were one of the subjects covered. Anyways...
An Application that is running is usually refered as a process. Within that process, or any process for that matter, are pieces of related codes, or Threads. Thus, a process is made up of one to many pieces of thread.
Now, in VB6, multithreading is not supported since your code gets executed step by step. A thread will have to wait for another thread to finish before it can execute. This can lead to your resources being wasted. An example of this is a thread that is writing to disk. When this thread is executing, the CPU is idle when it could be doing something.
The concept of multithreading is that the CPU should always be doing something, to fully utilize it. VB.Net allows you to execute more than one thread at the same time, thus fully utilizing your app.
For more imformation, try buying a Comp Sci book. I'm sure their explanation is much, much better.;P
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|