Ir para conteúdo
Fórum Script Brasil

juniorcyber

Membros
  • Total de itens

    5
  • Registro em

  • Última visita

Tudo que juniorcyber postou

  1. Alquem saberia me dar pelo menos um rumo de onde eu deveria mecher?? se alguém tiver alguma noção disso e puder me ajudar eu agradeceria muiiito!! rs Falowww!!
  2. Olahh pessoal!! Eu baixei um projeto de um editor de imgagem bem simples q eu quero acrescentar em meu projeto! eu queria q a seleção dele fike sempre na proporção bloqueada(Tipo "Aspect Ratio") O comando q eu uso pra chamar a caixa de seleção é: "ShowGrip True" "lblShape" é a caixa de seleção (Label) __________________________________________________________________ Private Sub ShowGrip(bShow As Boolean) Dim i As Integer lblShape.Move 100, 100, 2000, 2000 lblShape.Visible = bShow For i = 0 To 7 lblGrip(i).Visible = bShow Next i MoveGrips2 'SetSelection bShow End Sub '=============Sizing grip staff============== Private Sub InitGrip() Dim i As Integer lblGrip(0).Width = GripSize lblGrip(0).Height = GripSize For i = 1 To 7 Load lblGrip(i) lblGrip(i).MousePointer = i + 4 * Int((9 - i) / 4) Next i lblGrip(0).MousePointer = 8 ShowGrip False End Sub Private Sub lblGrip_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single) If Button = vbLeftButton Then bSizing = True xStart = x: yStart = y lblShape.Enabled = False End If End Sub Private Sub lblGrip_MouseMove(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single) Dim lft As Long, tp As Long, wdt As Long, hgt As Long If bSizing Then Select Case Index Case 0 lft = lblShape.Left + x - xStart tp = lblShape.Top + y - yStart wdt = lblShape.Width - x + xStart hgt = lblShape.Height - y + yStart Case 1 lft = lblShape.Left + x - xStart tp = lblShape.Top wdt = lblShape.Width - x + xStart hgt = lblShape.Height Case 2 lft = lblShape.Left + x - xStart tp = lblShape.Top wdt = lblShape.Width - x + xStart hgt = lblShape.Height + y - yStart Case 3 lft = lblShape.Left tp = lblShape.Top wdt = lblShape.Width hgt = lblShape.Height + y - yStart Case 4 lft = lblShape.Left tp = lblShape.Top wdt = lblShape.Width + x - xStart hgt = lblShape.Height + y - yStart Case 5 lft = lblShape.Left tp = lblShape.Top wdt = lblShape.Width + x - xStart hgt = lblShape.Height Case 6 lft = lblShape.Left tp = lblShape.Top + y - yStart wdt = lblShape.Width + x - xStart hgt = lblShape.Height - y + yStart Case 7 lft = lblShape.Left tp = lblShape.Top + y - yStart wdt = lblShape.Width hgt = lblShape.Height - y + yStart End Select If wdt < 0 Or hgt < 0 Or lft < 0 Or tp < 0 Or lft + wdt > picImage.Width Or tp + hgt > picImage.Height Then Exit Sub lblShape.Move lft, tp, wdt, hgt MoveGrips End If End Sub Private Sub lblGrip_MouseUp(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single) bSizing = False lblShape.Enabled = True ' SetSelection True End Sub Private Sub lblShape_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) If Button = vbLeftButton Then bMoving = True xStart = x: yStart = y lblShape.MousePointer = 5 ElseIf Button = vbRightButton Then UpdateEditMenu PopupMenu mnuEdit ElseIf Button = vbMiddleButton Then UpdateImageMenu PopupMenu mnuImage End If End Sub Private Sub lblShape_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single) Dim lft As Long, tp As Long If bMoving Then lft = lblShape.Left + x - xStart tp = lblShape.Top + y - yStart If lft <= 0 Then lft = 0 If tp <= 0 Then tp = 0 If lft > picImage.Width - lblShape.Width Then lft = picImage.Width - lblShape.Width If tp > picImage.Height - lblShape.Height Then tp = picImage.Height - lblShape.Height lblShape.Move lft, tp MoveGrips End If End Sub Private Sub lblShape_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single) bMoving = False lblShape.MousePointer = 0 ' SetSelection True End Sub Private Sub MoveGrips2() XGrip(0) = lblShape.Left - GripSize XGrip(1) = lblShape.Left + lblShape.Width / 2 - GripSize / 2 XGrip(2) = lblShape.Left + lblShape.Width YGrip(0) = lblShape.Top - GripSize YGrip(1) = lblShape.Top + lblShape.Height / 2 - GripSize / 2 YGrip(2) = lblShape.Top + lblShape.Height lblGrip(0).Move XGrip(0), YGrip(0) lblGrip(1).Move XGrip(0), YGrip(1) lblGrip(2).Move XGrip(0), YGrip(2) lblGrip(3).Move XGrip(1), YGrip(2) lblGrip(4).Move XGrip(2), YGrip(2) lblGrip(5).Move XGrip(2), YGrip(1) lblGrip(6).Move XGrip(2), YGrip(0) lblGrip(7).Move XGrip(1), YGrip(0) End Sub _____________________________________________________________ to até com dor de cabeça tentando achar uma forma de fazer isso!! rs se alguém tiver uma dica aihh por favor me ajude!! em quanto isso eu vo tentando sozinho!! valeu!!!!!
  3. CAramba!! Brigadãoo!!! Funcionou Certinho certinho!!! Falowwww!!
  4. Olah Pessoal!! Eu to desenvolvendo um projeto e o Forum do script brasil tem sido meu guia!! só q agora eu cheguei em um probleminha q eu não consigo resolver, agora vou apelar a vocês! meu caso é o seguinte, eu fiz um campo q pesquisa e abre os dados da tabela pelo nº de registro(ID), Bom ele ta funcionando "quase" perfeitamente! o unico problema é q ele só abre os dados da tabela quando o nº do registro é maior que o atual (ex: se eu to no registro "5" ele abre só do 5 em diante como 6, 7 e etc.. e não abre os registros a baixo como 4, 3 etc..) Quando eu pesquiso de um numero a baixo ele sempre da a mensagem q eu designei se eu não achar registro ou (Run-Time error "3021" BOF ou EOF são verdadeiros....) a minha conexão é esta: ________________________________________________________________________________ Dim rs1 As New ADODB.Recordset sql = "Select * from Academias WHERE ID_Fed='" & FldCodFed.Text & "' order by ID asc" rs1.CursorLocation = adUseClient rs1.Open sql, cn, adOpenForwardOnly, adLockPessimistic Public Sub CarregarCamposAcad() With rs1 TextPesqCod = rs1.Fields("ID") TextNomeAcad = rs1.Fields("NomeAcad") End With End Sub ______________________________________________________________________________ e o campo de pesquisa é este: _______________________________________________________________________ Private Sub TextPesqCod_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then codAnterior = rs1.Bookmark rs1.Find ("ID=") & TextPesqCod If rs1.EOF = True Then MsgBox "O Código Pesquisado é Inexistente", , "Atenção" rs1.Bookmark = codAnterior End If CarregarCamposAcad End If End Sub ________________________________________________________________________________ alguém tem alguma sujestão pra mim resolver este erro??
×
×
  • Criar Novo...