|
Working with another fella, I was finally able to get a working example of GetIfTable going in VB.NET. The only problem is that its only partially working.
I still cant retrieve the name of the network adapters.
If anyone has a working example of GetIfTable or GetIfEntry with VB.NET (not c# here folks) I would be extremely greatful!!!
|
|
|
|
|
I followed the steps to do the "Redistributing the .NET Framework Using
Visual Studio .NET Deployment"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetdep/html/vsredistdeploy.asp
At the section: To customize the launch condition message
1. In Solution Explorer, select the deployment project.
2. On the View menu, click Editor, and then click Launch Conditions.
a) At first we could not see section #2 (above) that was why we tried going
to the Tools ---> Customize ---> View ---> Coomands ---> Select View --->
Then drag the Launch Conditions into View menu and drop it there
b) Now we can see it appearing in View menu list ... but it is dimmed (can not access)!
Does anyone know how to do this?
Many thanks
--
Anh
|
|
|
|
|
Ok...can anyone help me with this problem. I"m havinng troulbe to figure out how to use the data members and fill them both completely with zeros while initiallize them in the default constructor.
Here is what I have so for the my header (.h) file...
class ConnectFour
{
private:
//date members
int board[12][13];
int numChips[7];
public:
ConnectFour();
//default constructor
};
And here is what I have in my .cpp file....
ConnectFour::ConnectFour()
{
board[12][13] = 0;
numChips[7] = 0;
for(int i=0; i < 12; i++)
{
for(int j=0; j<13; j++)
{
board[i][j] = 0;
}
}
for(int i=0; i<7; i++)
{
numChips[i]= 0;
}
}
IS THIS RIGHT?....BELOW IS HOW IT IS SUPPOSED TO BE DONE ON THE DIRECTIONS FOR THIS PROGRAM!
THANKS GUYS ..YOU GUYS SAVE MY LIFE
Data Members:
1.)a 2-dimensional array to hold the board – To make it easier to check for wins you chould use a board that has 12 rows and 13 columns. Only rows 3 – 8 and columns 3 – 9 will actually hold the board (which has 6 rows and 7 columns). The remaining cells will always contain zeros.
2.)a single-dimensional array of 7 ints to hold the number of chips dropped into each column of the board.
Methods
1.)a default constructor to initialize both arrays – filling them both completely with zeros
|
|
|
|
|
You might want to post this question in the VC++ Forum instead. This Forum is reserved for Visual Basic and VB.NET...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am trying to make an address book and am having trouble with certain steps.
Does anyone know where I could find a good example to add, delete,
find, edit, save, and undo changes to an access database? This is my first time creating a project with a database and am having trouble with the concept. An example would be once a user fills in all the text boxes with their info and clicks the save button, do I have to update and add rows to my dataset first and then update the database? That is the confusing part for me. Even just a small example would be great for me to get the overall concept and build on it from there.
Thanks
Beginner in ASP.Net and VB.Net
|
|
|
|
|
Try to download the sample book from kidwaresoftware[^]. This book has only 50% of its set but you can read it just for understanding. I like this book too because it explain clearly and very good. But you need to know how to use VB6. You could find many more free sample chapter from kidware[^] website.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Hi Im a bit new to VB and try to understand how to build a class structure to store some data. First I tried to do it with type definitions and collections but this did not work, giving compill errors about using local types in "public scope".
The question is how do I do int in a proper way?
Should the types data, entry, value and vector be defined as separat classes or can I build them as types? I need to in other places of the code work with them separatly. If I do them as separate classes is there a way of doing this in one sigle file, most of the would be realy simple simular to a type definition?
What is best to use, a collection or a vector, when I define the entry type/class should I delcare the Values as a vector of value and the do ReDim on this when adding more data or use a collectiond that has suport for all this built in?
What Im trying to do is something like
data
-dataName as string
-DataEntrys() as entry
entry
-entryName as string
-Values() as value
-Vectors() as vector
value
-valueName as string
-valueValue as integer
vector
-vectorName as string
-vectorNumbers() as integer
|
|
|
|
|
Hi all,
I've created an ActiveX control using Visual C++ .NET.
When I add this control to a container created with Visual C++ .NET (or a Visual C++ 6.0) everything works and there is no apparently problem. But now, I'm trying to test this ActiveX with an application created with Visual Basic 6.0. The problem is that the ActiveX control does not appear in the list of registered components from the Visual Basic 6.0 (Menu -> Project -> Components, or Ctrl+T). So, I can't add my ActiveX to the Visual Basic 6.0 container.
When I try to make the same operation with a Visual Basic .NET container, I find the same situation, this is, the ActiveX control is not in the registered components list. But the ActiveX control is already registered.
I use the OleView application in order to ensure that the control is registered.
Due to my ActiveX control perfectly works with a Visual C++ .NET (and a Visual C++ 6.0) container, I suppose there is any bad chosen compiler option (by the time, everything is by default). Does anybody experimented the same situation testing his/her ActiveX in a Visual Basic container?
Thanks in advance.
|
|
|
|
|
You might want to try using REGSVR32 to unregister, the re-register your .DLL to see if that clear it up. If not, your .DLL is not registering itself properly for some reason. You might want to ask what the complete steps for this process are in the Visual C++ Forum.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for your answer Dave, but I have already followed all these steps. The .OCX is correctly unregistered and also registered by means of the REGSVR32.exe application.
|
|
|
|
|
Try to create setup file for your activex control from third party application. Try to use install shield and package only your activex control and make its option to auto register the control after the installation process.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
HELP!!!
Im new to VB.net and i have a project to do and not sure how to do it.
Here it goes:
I want to add and timer & button. I want to make it so that in the first 2 seconds, if the button is not pressed during the 2 seconds, then a point is automatically scored and if the button is pressed then points is the same. Its a game simulation.
So how do i make it that if the button is NOT clicked WITHIN 2 seconds, then a varible scores a point.
What code do i write for the timer or button?
please help asap
|
|
|
|
|
Asummed you have form with timer and button:
<br />
Dim m_ButtonClicked As Boolean 'Set this if button is pressed<br />
Dim m_IsTimeGone As Boolean 'Set it after 2 seconds<br />
Dim m_TimeInSecs as Long<br />
<br />
In timer event handler you have to check
m_ButtonClicked before setting m_IsTimeGone (remember to check if this is not 2 seconds from the beginning)
|
|
|
|
|
I got a strange problem on 2 PCs. They have Windows 2000 SP4, Visual Studio 2003 and Framework 1.1.
We are doing asp.net with vb langage.
When I try to open design, even after rebuilding solution, I got the message "The class file 'page.aspx' specified as the codebehind for 'page.aspx.vb' could not be loaded. Make sure that the codebehind attribute in the page or control directive properly references an existing code behind file."
My solution is working well on other PC, the codebehind is correct and the project compile and execute correctly.
More over, in the solution explorer when you are on the vb file, click on the design icon, the previous message appears followed by this french message :
"Aucun éditeur disponible for 'c:\inetpub\wwwroot\page.aspx'. Vérifiez que l'application correspond au type de fichier (.aspx) est installée."
in english something like :
"No editor available for 'c:\inetpub\wwwroot\page.aspx'. Please verify that your application for aspx file is installed."
I try to do a new empty solution,
I try to repair Visual Studio 2003,
I try to uninstall and install newly Visual studio 2003 and framework
but the problem still there.
Please help I have no more idea except reinstall the whole PC.
|
|
|
|
|
Check that in the HTML Page this code is at the top and matches the code behind page
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="PageName.aspx.vb" Inherits="ProjectName.FormName"%>
So in your project i assume
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="Page.aspx.vb" Inherits="ProjectName.Page"%>
Then in you vb class the name is
Public Class Page
When i had this problem re-doing this bit seemed to solve it.
Cheers
"If i was king cigarettes would be free."
|
|
|
|
|
Firstly,
Most of us know a lot of games,Especially Like Red Alert 2 or any Command & Conquer Game,There are also
Games where the Player Have Guns and armor,There are some programs called "Trainers" That Can access the
memory of the game and modify the value of the Money,Armor,etc....
This "Trainer" knows the adress of the variable and knows its length (2-4-8-...)bytes so it can modify it.
Now,My question is -----> how do they do that ?
Can VB Do it,I think it must use API Functions to do it.
So how Can I do it in VB evenif I use API?
If VB Can't do it,Sure C++ Or C# can but how ?
In short,I want an Example of Two programs(Source Code VB) In the First there is a variable which I want to make the second program able to modify at runtime and I want the second program to be able to check if the first one is running before trying to modify the variable.
|
|
|
|
|
I'm trying to pass a variable from a vb.net page to an ASP Page to generate a javascript.
Hers's the code in VB.net
Dim ScriptString As String = "<script type='text/javascript'>function Go(){return}</script>"<br />
ScriptString += "<script type='text/javascript' src='exmplmenu_var.asp ?Ordlkp=False'></script>"<br />
ScriptString += "<script type='text/javascript' src='menu_com.js'></script>"
Here's the code in ASP to retrive the same
<%if request.QueryString("OrdLkp") then %><br />
Menu1=new Array("Order LookUp","http://www.dynamicdrive.com","",4,20,138);<br />
Menu1_1=new Array("Search By Order No","blank.htm","",0,20,138); <br />
Menu1_2=new Array("Search By Reference","http://www.cnn.com","",0,20,138);<br />
Menu1_3=new Array("Search By Order Date","http://www.abcnews.com","",0);<br />
Menu1_4=new Array("View Jobs on Query","http://www.msnbc.com","",0);<br />
<br />
<%end if%>
But I am recieving errors at the page.Could anybosy pls tell me where I'm going wrong.
Also,if I wanted to pass a boolean variable instead of the hard coded false value.How can I do that?
Thanks n regards
g
|
|
|
|
|
This question would get much better results in the ASP.NET Forum.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi! gentlepeople,
Probably you might help me regarding this.. I'm new to these Vb.net language. My question is Does AddressOf is accepted in Vb.net?
in this VbCode i have the following components:
- MyAPI.bas (this contains SetCallbacks)
- Callback.bas (this contains the STATE_CALLBACK function)
' API declaration in myAPI.bas <br />
Public Declare Function SetCallbacks Lib "tfm.dll" ( _ <br />
ByVal hConn As Long, ByVal pfnGuiCallback As Long, _ <br />
ByVal pGuiCallbackCtx As Long,ByVal pfnGuiStateCallback AsLong, <br />
ByVal pGuiCallbackCtx As Long) As Long <br />
- A Form with a button cmdCallback
<br />
Public Sub cmdCallback_click() <br />
Result = SetCallbacks(Connection, 0&, 0&, AddressOf STATE_CALLBACK, 0&) <br />
''Any Code here <br />
End Sub <br />
- i have this module Callback.bas a procedure function called STATE_CALLBACK
<br />
Function STATE_CALLBACK(ByVal pGuiCallbackCtx As Long, ByVal dwState As Long, ByRef pRes As Byte, ByVal Msg As Long, ByVal byProg As Byte, ByVal pSample As Long, ByVal pData As Long) As Long <br />
How will i convert this to vb.net???! I have a module for the Callback..
what i did was with the same format
<br />
Result = SetCallbacks(Connection, 0, 0, AddressOf Callback.STATE_CALLBACK, 0) <br />
and the error appeared was "AddressOf expression cannot convertes to integer because integer is not delegate type" Im getting stucked in here...I really need this badly
Thanks for your kind help.
|
|
|
|
|
By the way...if you copy-pasted your code correctly...the "AsLong" should be changed to "As Long"
try replacing this:
Public Declare Function SetCallbacks Lib "tfm.dll" ( _ <br />
ByVal hConn As Long, ByVal pfnGuiCallback As Long, _ <br />
ByVal pGuiCallbackCtx As Long,ByVal pfnGuiStateCallback AsLong, <br />
ByVal pGuiCallbackCtx As Long) As Long<br />
with this:
<br />
Public Declare Function SetCallbacks Lib "tfm.dll" ( _ <br />
ByVal hConn As Long, ByVal pfnGuiCallback As Long, _ <br />
ByVal pGuiCallbackCtx As Long,ByVal pfnGuiStateCallback As IntPtr, <br />
ByVal pGuiCallbackCtx As Long) As Long <br />
|
|
|
|
|
i tried your suggestion..
but the error appeared was Overload resolution failed because no accessible 'PTSetGUICallbacks' accepts this number of arguments.
<br />
Result = myAPI.SetCallbacks(Conn, 0, AddressOf Callback.STATE_CALLBACK, 0)<br />
any suggestions are most welcome..
Thanks for your kind help..
|
|
|
|
|
hi,
I could not get the first row from excel file when read data using OLEDB.
The exception that I catched is "Could not find installable ISAM."
Below is my code:
Dim strCnnStr As String = "provider=Microsoft.Jet.OLEDB.4.0; " & _<br />
"data source=" & dlgExcelFile.FileName & "; " & _<br />
"Extended Properties=Excel 8.0;HDR=No"<br />
Dim myAdapter As New OleDb.OleDbDataAdapter("select * from [Sheet1$]", strCnnStr)<br />
Dim myDS As New DataSet<br />
myAdapter.Fill(myDS)
Please help me.
Thank you very much.
|
|
|
|
|
This is the second time you've posted this...
The problem with the "Could not find installable ISAM" is probably because "HDR=No" is not a valid option for the Excel provider. I would try modifying the sheet your using as a datasource and actually put in Headers on those columns. OLEDB is probably converting the first row into column headers to use them as column names in the resulting data table.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank you.
Is there any option to tell OLEDB the first row is data, not header? I think it's in the connectionstring "HDR=No". But I catched exception when used this.
|
|
|
|
|
Not that I can find. The reason your getting an exception is because HDR=No is not a valid parameter in the connection string.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|