Click here to Skip to main content
15,889,335 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: MAke button affect numerical field Pin
Solanki Rajat27-Apr-07 22:54
Solanki Rajat27-Apr-07 22:54 
GeneralRe: MAke button affect numerical field Pin
Dave Kreskowiak28-Apr-07 4:30
mveDave Kreskowiak28-Apr-07 4:30 
QuestionGetting the hwnd from API functions Pin
haggenx27-Apr-07 10:54
haggenx27-Apr-07 10:54 
Questioncrystal reporting Pin
JustmeNick27-Apr-07 10:28
JustmeNick27-Apr-07 10:28 
AnswerRe: crystal reporting [modified] Pin
Tarakeshwar Reddy27-Apr-07 11:09
professionalTarakeshwar Reddy27-Apr-07 11:09 
Questioninfo abt sql server 2005 (inbuild of VS2005) Pin
kripa2127-Apr-07 6:09
kripa2127-Apr-07 6:09 
AnswerRe: info abt sql server 2005 (inbuild of VS2005) Pin
kubben28-Apr-07 1:28
kubben28-Apr-07 1:28 
QuestionEditing cells in MSHFlexGrid control [modified] Pin
Barry True27-Apr-07 5:47
Barry True27-Apr-07 5:47 
I've got a VB DLL (VB6) that displays a form with an MSHFlexGrid control that we allow the user to edit. We are displaying combo boxes, text boxes, and other controls to allow the user to edit the cell data when the user clicks in the cell. We've got code to adjust the size and location of the text box and combo box so it is as close to the size and position of the cell. What I'm finding, however, is that with some cells the size and position of the control is pretty close to the cell's size and location. In others, however, the position is noticeably off (as much as half the cell width and height). Here is the subroutine we are calling to position the text box. The code for positioning the combo boxes is similar.

Private Sub ShowMyTextBox(myText As TextBox)
On Error GoTo ErrHandler

Dim strTitle As String
strTitle = "frmSettings_ShowMyTextBox"

With myText
.Width = MSHFlexGrid1.CellWidth
.Left = MSHFlexGrid1.CellLeft + MSHFlexGrid1.Left
.Top = MSHFlexGrid1.CellTop + MSHFlexGrid1.Top
.text = MSHFlexGrid1.text & g_FirstTextChr
SelectText myText
.Visible = True
.SetFocus
.ZOrder 0
End With

Exit Sub

ErrHandler:
HandleErrorMsg strTitle, Err, IDS_ERR_MSG2, vbExclamation
End Sub


The SelectText line above just selects all the text in the text box. The HandleErrorMsg line is just a sub in a BAS module that logs error information to a log file.

My question: Is there a better way to position the control over the cell so the difference in the cell's size and position and the control's size and position isn't so noticeably different?



-- modified at 17:34 Friday 27th April, 2007
Questionlow disk space Pin
charchabil0327-Apr-07 4:21
charchabil0327-Apr-07 4:21 
AnswerRe: low disk space Pin
Guffa27-Apr-07 6:58
Guffa27-Apr-07 6:58 
Questionurgent Pin
d_smit27-Apr-07 3:07
d_smit27-Apr-07 3:07 
AnswerRe: urgent Pin
Arun.Immanuel27-Apr-07 3:12
Arun.Immanuel27-Apr-07 3:12 
AnswerRe: urgent Pin
Sathesh Sakthivel27-Apr-07 3:27
Sathesh Sakthivel27-Apr-07 3:27 
Questioncatastrophic failure [modified] Pin
Nilesh Hapse27-Apr-07 1:54
Nilesh Hapse27-Apr-07 1:54 
AnswerRe: catastrophic failure Pin
Christian Graus27-Apr-07 19:56
protectorChristian Graus27-Apr-07 19:56 
Questiondebug and build in vb.net Pin
FeRtoll27-Apr-07 1:04
FeRtoll27-Apr-07 1:04 
AnswerRe: debug and build in vb.net Pin
Christian Graus27-Apr-07 1:57
protectorChristian Graus27-Apr-07 1:57 
GeneralRe: debug and build in vb.net Pin
FeRtoll3-May-07 20:27
FeRtoll3-May-07 20:27 
QuestionPDF without flattened images Pin
vsambhe27-Apr-07 0:46
vsambhe27-Apr-07 0:46 
QuestionPreviousPage.FindControl with a drop down list Pin
nickrjsmith27-Apr-07 0:18
nickrjsmith27-Apr-07 0:18 
AnswerRe: PreviousPage.FindControl with a drop down list Pin
Arun.Immanuel27-Apr-07 2:11
Arun.Immanuel27-Apr-07 2:11 
GeneralRe: PreviousPage.FindControl with a drop down list Pin
nickrjsmith27-Apr-07 2:12
nickrjsmith27-Apr-07 2:12 
GeneralRe: PreviousPage.FindControl with a drop down list Pin
nickrjsmith27-Apr-07 2:13
nickrjsmith27-Apr-07 2:13 
GeneralRe: PreviousPage.FindControl with a drop down list Pin
Arun.Immanuel27-Apr-07 3:37
Arun.Immanuel27-Apr-07 3:37 
GeneralRe: PreviousPage.FindControl with a drop down list Pin
Arun.Immanuel27-Apr-07 2:52
Arun.Immanuel27-Apr-07 2:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.