|
hay all,
i currently have the problem while assigning a dataview with a filled table the first time. ok, in short:
in a winform a have a dataview, a typed dataset and a combobox. the combobox's datsource is the dataview. the dataview's table is a table of the dataset. on startup of the application an other dataset of the same type will be filled with data. after showing the form i assign the dataview's table with a table of the preloaded dataset. doing this the first time this takes about 30 seconds !!! if i do it a second time it works fine. i tryed to set the "dataview.table = nothing" before assiging it with the filled table but no changes happend. if i run the command in the commandview of vs it works also fine. it's the same behaviour if the code runs the normal way or i run it by single step.
any idea?
tnx, bernd
if you need code snippes, let me know
|
|
|
|
|
I am writing a software to be installed on the client computer and listens to a port number then by setting the proper config in IE , all the requests from the browser will be redirected to this application and after that the application will redirect the request to a proxy server. Please sont ask "why the browser doesn't directly conect to the proxy server?" because I have my reasons.
I am using TcpListener,Socket and TCPClient objects.
the Socket object is responsible to exchange data between the browser and application using the TcpListener and will be closed after the complete proccess.
the TCPClient object is responsible to transfer the Socket requests to proxy server and to redirect the proxy server responses to the Socket. It is so easy.
But some bad things happends and I dont know why
running the application and debuging the application will represent different way of doing the job. for example in following code :
<br />
.<br />
.<br />
.<br />
1 Dim Counter2 As Integer<br />
2 Do<br />
3 Dim hBuffer As Byte() = New Byte(tcpc.ReceiveBufferSize - 1) {}<br />
4 <br />
5 'Get response of previously sent data from the proxy server<br />
6 'I also used tcpc.getstream and got the same result<br />
7 'tcpc as TCPClient<br />
8 'ofcourse TCPClient doesnt have Socket object for public I used my own<br />
9 'class witch was drived from TCPClient<br />
10<br />
11 Counter2 = tcpc.theSocket.Receive(hBuffer, 0, hBuffer.Length, SocketFlags.None)<br />
12<br />
13 'Trim the buffer to omit the null area<br />
14 TrimBuffer(hBuffer, Counter2)<br />
15<br />
16 'If there is some data then send it to the browser<br />
17 If Counter2 > 0 Then<br />
18 'Sending the data got from proxy server to browser<br />
19 S.Send(hBuffer, 0, hBuffer.Length, SocketFlags.None)<br />
20 End If<br />
21<br />
22 'If the was some data go get more<br />
23 Loop While Counter2 > 0<br />
.<br />
.<br />
.
at line 11 some times it will stop responsing and the expected thing is responsing 0 for terminating the proccess.
also at line 10 some times it says that the TCPClient connection is lost and I never asked to close the cnnection also it is not good to open a TCPClient for each request.
please help me and give some tips if possible.
My mind is gona be dead soooooooon !
Aboo
|
|
|
|
|
could you help me to create a grid like excel?
it should paste the value from clipboard/excel and paste it in grid (like pasting in excel).
i tried flexcell grid but its a demo version.
|
|
|
|
|
I cudnt understand your question properly........wat I understood is that you want to put the Excel sheet data into a control that looks like excel in .Net.
Use datagrid control provided by the Visula Studio.Net.......
And bind dataset with it or Read excel file in dataset and bind it with the grid.
_mubashir
Why it is called "BUILDING" when it is already Built.
|
|
|
|
|
binding is easy.
the hard part is copying the values of an excel data and pasting(not linking) it to grid in vb.(this is the behaivior im looking for)
i need this for multiple data entry.
i need to copy the values of a grid from SAP and pasting it to my grid. the problem is when im trying to paste it,it only paste in one cell and not in multiple cells like excel does.
|
|
|
|
|
ok Lets play a little gamble.......
try out the following code to copy the excel data to the Datagrid in VS.Net
<br />
Dim ds as new Dataset<br />
ds.ReadXml("strFilename+Path") 'Xls File path<br />
'Now bind the dataset with Grid........<br />
Done...?
_mubashir
|
|
|
|
|
i already figure out what im looking for. its by clipboard methods
thanks anyhow
|
|
|
|
|
Hi,
here is Sumit Agarwal
I have a problem when working in My VB6.0 project and opening a wword object and when setting that word objects find option then my Visaul Basic Project get's closed. Any one can help me.
Thanks in advance
|
|
|
|
|
A bit difficult without seeing your code to know what the problem is but i do know that a fresh install of Word will have problems used from VB if you are doing it in a terminal server session. There is a patch from MS to fix this.
Jon
|
|
|
|
|
i created an activex dll project "Project2" with class Class1. Created a function GetValues as below using visual basic 6.
Function GetValues(nValues() As Long) As Boolean
ReDim nValues(2)
nValues(0) = 1
nValues(1) = 2
nValues(2) = 3
GetVals = True
End Function
This function works great with the vb code
Private Sub Form_Load()
Dim nVals As New Project2.Class1
Dim bFun
Dim nlong() As Long
bFun = nVals.GetValues(nlong)
MsgBox nlong(0) & " " & nlong(1) & " " & nlong(2)
End Sub
Now i am trying to call the same function from an asp page with code as below.
<%
dim bFun
dim nVals
dim nLong()
set nVals=server.createobject("Project2.Class1")
nVals.getValues(nLong)
response.write nLong(0) & " "
response.write nLong(1) & " "
response.write nLong(2) & " "
%>
the browser barks with a type mismatch error "Microsoft VBScript runtime (0x800A000D)Type mismatch: 'getValues' /testdata.asp, line 10"
i am . can some one help me? thanks in advance.
srikanth
|
|
|
|
|
Greetings!
I want to implement a filmstip in my application. I'm thinking of using a TableLayoutPanel as a container with a PictureBox in each cell. Is this how one with more experience do it?
I've looked at TableLayoutPanel in the on-line help and searched for articles here - not much found.
What general steps or required objects are required to dynamically add rows to a tablelayoutpanel at run time?
This needs to be scrollable, show should I make the tablelayoutpanel scrollable or place the table in a scrollable panel?
Thanks,
Karen
Nooobie to OOP and VB.Net 2005
|
|
|
|
|
Plz tell me how to make owner drawn menu,listbox & combobox with vb6? plz tell details!
|
|
|
|
|
HOW TO PROVIDE DOUBLE CLICK OPTION FROM GRID CONTROL?
ANOTHER QUESTION IS
AFTER SAVING A RECORD, HOW TO REFRESH THE GRID AUTOMATICALLY?
|
|
|
|
|
for what u want to use dclick??
and answer to ur secon qustion is
after sving the record first call datasetname.clear() and then again call dataadapter.fill(datasetname,"tablename")
this will do your work
never stop from trying
|
|
|
|
|
first of all thanks for your reply.
i need to provide double click editing option from data grid control. it is for editing.
please suggest me.
|
|
|
|
|
In the code editor, locate the datagrid on the pulldown menu at the top left. Then locate DoubleClick on the pulldown menu to the right. This will create the exception block where you can place the edit code. If you simply double click on the datagrid, the exception block created is Navigate rather than DoubleClick.
|
|
|
|
|
I have an array of labels on a form. I want to track which one was clicked on (right click). Anyone know an easy way to do this?
|
|
|
|
|
Since you're referencing an array of labels I assume you're not using .NET. In that case, the MouseDown event for the control array would probably be eaisest:
Private Sub Label1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)<br />
If Button = vbRightButton Then<br />
MsgBox "Label = " & Label1(Index).Caption & " Index = " & Index<br />
End If<br />
End Sub
|
|
|
|
|
Thanks, but I am using .NET. It appears the compatability wizzard converted these, from the "VisualBasic.Compatability" class, guess I need to look at changing those as well.
Any quick suggestions as to how to go about doing this progaramatically? I need to load a bunch of labels on screen (representing slots) and allow the operator to select individual ones. The number and orientation depend on the system configuration at the time and can not be hard coded.
|
|
|
|
|
First off, the conversion wizard is the devil, just rewrite
The concept is very similar:
<br />
Private Sub Label1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseDown, Label2.MouseDown<br />
If e.Button = Windows.Forms.MouseButtons.Right Then<br />
MsgBox("Label = " & sender.Name)<br />
End If<br />
End Sub<br />
This assumes you have a static "maximum" number of labels that you can keep hidden unless needed and have all of them listed on the event handles.
If you need a variable number of labels that you can't predefine then you will need to create a new label control, and assign it to the event handler. I will leave that example to someone a bit more familiar with .NET than myself.
|
|
|
|
|
First off, the conversion wizard is the devil, just rewrite
Agreed, once you have the fundamentals down, I'd suggest a complete rewrite as well.
|
|
|
|
|
in vb.net when we create a new form the code lookes like
Public Class frmlogin
Inherits Inherits System.Windows.Forms.Form
but in vb.net 2005 it doesn't work can anyone tell how to do this .i have a clss that turn form to round shape and i want to inherits that form instend of windows.forms.form
never stop from trying
|
|
|
|
|
This is definitely Monday.
I have an Excel worksheet that I am trying to get the contents of a DataGrid into.
worksheet.Cells(2, 1) = StatusGrid.Column(1).Item(1)
It would be nice if it were that simple. I was thiking of casting the datagrid into a table, but for reasons that are too cosmic to go into here, that is not possible at this time.
So... the question is.. Using VB.Net (ASP), how in the world does one reference a Cell in a datagrid?
|
|
|
|
|
Close...
StatusGrid.Items(1).Cells(1).Text()
|
|
|
|
|
So far so good. That works on bound columns beautifully.
Some of the other columns are rendered as Template columns. How would you perform the same operation on a column as defined here:
<asp:templatecolumn headertext="Date Added">
<itemtemplate>
<asp:label id="lblDateAdded" runat="server" text="<%# DataBinder.EvalContainer, "DataItem.DateAdded") %>">
<edititemtemplate>
<asp:textbox id="txtDateAdded" runat="server" text="<%# DataBinder.Eval(Container, "DataItem.DateAdded") %>" width="100%">
Thanks again in advance for all of your help.
-Ray
|
|
|
|